﻿package plugin.systemSets.game
{
    import com.core.*;
    import com.sh.game.global.*;
    import flash.events.*;
    import manager.*;
    import morn.core.components.*;
    import morn.core.handlers.*;
    import plugin.systemSets.*;
    import uiresource.*;

    public class SystemSetGame extends SystemSetUI
    {
        private const keyArr:Array;
        private var _instance:SystemSet;
        private var career:int = 0;
        private var cfgSystemset:Array;
        private var cfgItems:Object;
        private var isMouseDown:Boolean = false;

        public function SystemSetGame(param1:SystemSet)
        {
            this.keyArr = [{txt_name:"切换攻击模式", txt_key:"H"}, {txt_name:"角色面板", txt_key:"C"}, {txt_name:"背包面板", txt_key:"B"}, {txt_name:"技能面板", txt_key:"S"}, {txt_name:"队伍面板", txt_key:"P"}, {txt_name:"好友面板", txt_key:"F"}, {txt_name:"帮会面板", txt_key:"U"}, {txt_name:"设置面板", txt_key:"O"}, {txt_name:"商城面板", txt_key:"V"}, {txt_name:"小地图面板", txt_key:"M"}, {txt_name:"排行榜", txt_key:"L"}, {txt_name:"打开/关闭音效", txt_key:"Y"}, {txt_name:"强制攻击他人", txt_key:"Shift"}, {txt_name:"开始/结束挂机", txt_key:"Z"}, {txt_name:"自动拾取物品", txt_key:"空格键"}, {txt_name:"快速上下马", txt_key:"X"}, {txt_name:"官职面板", txt_key:"I"}, {txt_name:"神炉面板", txt_key:"G"}];
            this.cfgSystemset = ConfigDictionary.data.systemset;
            this.cfgItems = ConfigDictionary.data.item;
            this._instance = param1;
            return;
        }// end function

        override protected function initializeView() : void
        {
            super.initializeView();
            tab_title.selectHandler = vs_view.setIndexHandler;
            tab_title.selectedIndex = 2;
            this.initProtects();
            list_key.array = this.keyArr;
            cb_autobuypill.visible = false;
            var _loc_1:* = new SystemSetControl(this);
            ModelProxy.addObserver("systemset", _loc_1);
            var _loc_2:* = ModelProxy.getValue("systemset", "guaji");
            this.setGuaji(_loc_2);
            return;
        }// end function

        public function showPage(param1:Object) : void
        {
            if (param1 && int(param1) == 3)
            {
                tab_title.selectedIndex = 2;
                this.setProtectShow();
            }
            this.setBaseShow();
            this.setPickUpShow();
            return;
        }// end function

        private function initProtects() : void
        {
            this.career = UserData.getUserData("career");
            switch(this.career)
            {
                case 1:
                {
                    cb_battleoption1.label = "自动烈火剑法";
                    cb_battleoption2.label = "自动逐日剑法";
                    cb_battleoption5.label = "隔位刺杀";
                    cb_battleoption6.label = "禁止法神释放火墙";
                    var _loc_1:Boolean = true;
                    cb_battleoption6.visible = true;
                    var _loc_1:* = _loc_1;
                    cb_battleoption5.visible = _loc_1;
                    var _loc_1:* = _loc_1;
                    cb_battleoption2.visible = _loc_1;
                    var _loc_1:* = _loc_1;
                    cb_battleoption1.visible = _loc_1;
                    cb_battleoption4.visible = _loc_1;
                    cb_battleoption3.visible = false;
                    cb_battleoption4.x = cb_battleoption3.x;
                    cb_battleoption4.y = cb_battleoption3.y;
                    cb_battleoption6.x = 109;
                    cb_battleoption6.y = 186;
                    cbb_guajiparam1.labels = "普通攻击,刺杀剑法";
                    cbb_guajiparam2.labels = "无,半月剑法";
                    break;
                }
                case 2:
                {
                    cb_battleoption1.label = "持续魔法盾";
                    cb_battleoption6.label = "禁止法神释放火墙";
                    var _loc_1:Boolean = false;
                    cb_battleoption2.visible = false;
                    var _loc_1:* = _loc_1;
                    cb_battleoption3.visible = _loc_1;
                    var _loc_1:* = _loc_1;
                    cb_battleoption5.visible = _loc_1;
                    cb_battleoption4.visible = _loc_1;
                    var _loc_1:Boolean = true;
                    cb_battleoption6.visible = true;
                    cb_battleoption1.visible = _loc_1;
                    cbb_guajiparam1.labels = "普通攻击,闪电术";
                    cbb_guajiparam2.labels = "无,寒冰咆哮,地狱雷光";
                    cb_battleoption6.x = 109;
                    cb_battleoption6.y = 163;
                    break;
                }
                case 3:
                {
                    cb_battleoption1.label = "持续神圣战甲术";
                    cb_battleoption2.label = "自动召唤宝宝";
                    cb_battleoption3.label = "自动施毒";
                    cb_battleoption6.label = "禁止法神释放火墙";
                    var _loc_1:Boolean = true;
                    cb_battleoption1.visible = true;
                    var _loc_1:* = _loc_1;
                    cb_battleoption2.visible = _loc_1;
                    var _loc_1:* = _loc_1;
                    cb_battleoption6.visible = _loc_1;
                    cb_battleoption3.visible = _loc_1;
                    var _loc_1:Boolean = false;
                    cb_battleoption5.visible = false;
                    cb_battleoption4.visible = _loc_1;
                    cbb_guajiparam1.labels = "普通攻击,灵魂火符";
                    cbb_guajiparam2.labels = "无,飓风破";
                    cb_battleoption6.x = 0;
                    cb_battleoption6.y = 186;
                    break;
                }
                default:
                {
                    break;
                }
            }
            cbb_hppro1param1.labels = (this.cfgSystemset[1].name as String).replace(/#""#/g, ",");
            cbb_hppro1param1.visibleNum = cbb_hppro1param1.numLabels;
            cbb_mppro1param1.labels = (this.cfgSystemset[2].name as String).replace(/#""#/g, ",");
            cbb_mppro1param1.visibleNum = cbb_mppro1param1.numLabels;
            cbb_hppro2param1.labels = (this.cfgSystemset[3].name as String).replace(/#""#/g, ",");
            cbb_hppro2param1.visibleNum = cbb_hppro2param1.numLabels;
            cbb_hppro3param1.labels = (this.cfgSystemset[4].name as String).replace(/#""#/g, ",");
            cbb_hppro3param1.visibleNum = cbb_hppro3param1.numLabels;
            return;
        }// end function

        private function setProtectShow() : void
        {
            var _loc_1:* = ModelProxy.getValue("data", "option");
            if (_loc_1)
            {
                cb_hppro1.selected = Boolean(_loc_1.hppro1);
                txt_hppro1num.text = _loc_1.hppro1num;
                cbb_hppro1param1.selectedIndex = _loc_1.hppro1param1 >= 0 ? (_loc_1.hppro1param1) : (0);
                ti_hppro1param2.text = _loc_1.hppro1param2;
                cb_mppro1.selected = Boolean(_loc_1.mppro1);
                txt_mppro1num.text = _loc_1.mppro1num;
                cbb_mppro1param1.selectedIndex = _loc_1.mppro1param1 >= 0 ? (_loc_1.mppro1param1) : (0);
                ti_mppro1param2.text = _loc_1.mppro1param2;
                cb_hppro2.selected = Boolean(_loc_1.hppro2);
                txt_hppro2num.text = _loc_1.hppro2num;
                cbb_hppro2param1.selectedIndex = _loc_1.hppro2param1 >= 0 ? (_loc_1.hppro2param1) : (0);
                ti_hppro2param2.text = _loc_1.hppro2param2;
                cb_hppro3.selected = Boolean(_loc_1.hppro3);
                txt_hppro3num.text = _loc_1.hppro3num;
                cbb_hppro3param1.selectedIndex = _loc_1.hppro3param1 >= 0 ? (_loc_1.hppro3param1) : (0);
                cb_battleoption1.selected = Boolean(_loc_1.battleoption1);
                cb_battleoption2.selected = Boolean(_loc_1.battleoption2);
                cb_battleoption3.selected = Boolean(_loc_1.battleoption3);
                cb_battleoption4.selected = Boolean(_loc_1.battleoption4);
                cb_battleoption5.selected = Boolean(_loc_1.battleoption5);
                cb_battleoption6.selected = Boolean(_loc_1.battleoption6);
                cbb_guajiparam1.selectedIndex = _loc_1.guajiparam1 >= 0 ? (_loc_1.guajiparam1) : (0);
                cbb_guajiparam2.selectedIndex = _loc_1.guajiparam2 >= 0 ? (_loc_1.guajiparam2) : (0);
                cb_autobuypill.selected = Boolean(_loc_1.autobuypill);
                cb_guajiparam3.selected = Boolean(_loc_1.guajiparam3);
            }
            return;
        }// end function

        private function setBaseShow() : void
        {
            var _loc_1:* = ModelProxy.getValue("data", "option");
            if (_loc_1)
            {
                cb_showname.selected = Boolean(_loc_1.showname);
                cb_showblood.selected = Boolean(_loc_1.showblood);
                cb_showtitle.selected = Boolean(_loc_1.showtitle);
                cb_showmoveblood.selected = Boolean(_loc_1.showmoveblood);
                cb_showdrop.selected = Boolean(_loc_1.showdrop);
                cb_hideskill.selected = Boolean(_loc_1.hideskill);
                cb_nobusiness.selected = Boolean(_loc_1.nobusiness);
                cb_nomakefriend.selected = Boolean(_loc_1.nomakefriend);
                cb_nounion.selected = Boolean(_loc_1.nounion);
                cb_noteam.selected = Boolean(_loc_1.noteam);
                cb_showgncount.selected = Boolean(_loc_1.showgncount);
                cb_showfsname.selected = Boolean(_loc_1.showfsname);
            }
            return;
        }// end function

        private function setPickUpShow() : void
        {
            var _loc_1:* = ModelProxy.getValue("data", "option");
            if (_loc_1)
            {
                cb_pickupdrug.selected = Boolean(_loc_1.pickupdrug);
                cb_pickuparm.selected = Boolean(_loc_1.pickuparm);
                cb_pickupmaterial.selected = Boolean(_loc_1.pickupmaterial);
                cb_pickupgold.selected = Boolean(_loc_1.pickupgold);
                cb_pickupbylv.selected = Boolean(_loc_1.pickupbylv);
                cbb_pickuparmlv.selectedIndex = _loc_1.pickuparmlv;
                cb_autopickup.selected = Boolean(_loc_1.autopickup);
                cb_pickupfilter.selected = Boolean(_loc_1.pickupfilter);
                cb_pickupbgold.selected = Boolean(_loc_1.pickupbgold);
                cb_pickupfilteryp.selected = Boolean(_loc_1.pickupfilteryp);
                cb_pickupother.selected = Boolean(_loc_1.pickupother);
                cb_pickupxiyou.selected = Boolean(_loc_1.pickupxiyou);
            }
            return;
        }// end function

        public function initEvent() : void
        {
            btn_close.clickHandler = new Handler(this.doClose);
            this.addEventListener(MouseEvent.MOUSE_DOWN, this.fuck);
            cb_showname.clickHandler = new Handler(this.cbHandler, [cb_showname]);
            cb_showblood.clickHandler = new Handler(this.cbHandler, [cb_showblood]);
            cb_showtitle.clickHandler = new Handler(this.cbHandler, [cb_showtitle]);
            cb_showmoveblood.clickHandler = new Handler(this.cbHandler, [cb_showmoveblood]);
            cb_showdrop.clickHandler = new Handler(this.cbHandler, [cb_showdrop]);
            cb_hideskill.clickHandler = new Handler(this.cbHandler, [cb_hideskill]);
            cb_nobusiness.clickHandler = new Handler(this.cbHandler, [cb_nobusiness]);
            cb_nomakefriend.clickHandler = new Handler(this.cbHandler, [cb_nomakefriend]);
            cb_nounion.clickHandler = new Handler(this.cbHandler, [cb_nounion]);
            cb_noteam.clickHandler = new Handler(this.cbHandler, [cb_noteam]);
            cb_showgncount.clickHandler = new Handler(this.cbHandler, [cb_showgncount]);
            cb_showfsname.clickHandler = new Handler(this.cbHandler, [cb_showfsname]);
            btn_default0.clickHandler = new Handler(this.default0Set);
            cb_pickupdrug.clickHandler = new Handler(this.cbHandler, [cb_pickupdrug]);
            cb_pickuparm.clickHandler = new Handler(this.cbHandler, [cb_pickuparm]);
            cb_pickupmaterial.clickHandler = new Handler(this.cbHandler, [cb_pickupmaterial]);
            cb_pickupgold.clickHandler = new Handler(this.cbHandler, [cb_pickupgold]);
            cb_pickupother.clickHandler = new Handler(this.cbHandler, [cb_pickupother]);
            cb_pickupbylv.clickHandler = new Handler(this.cbHandler, [cb_pickupbylv]);
            cb_pickupxiyou.clickHandler = new Handler(this.cbHandler, [cb_pickupxiyou]);
            cbb_pickuparmlv.selectHandler = new Handler(this.cbbHandler, [cbb_pickuparmlv]);
            cbb_pickuparmlv.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cb_autopickup.clickHandler = new Handler(this.cbHandler, [cb_autopickup]);
            cb_pickupfilter.clickHandler = new Handler(this.cbHandler, [cb_pickupfilter]);
            btn_default1.clickHandler = new Handler(this.default1Set);
            cb_pickupbgold.clickHandler = new Handler(this.cbHandler, [cb_pickupbgold]);
            cb_pickupfilteryp.clickHandler = new Handler(this.cbHandler, [cb_pickupfilteryp]);
            pickypTextinput.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            pickypTextinput.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cb_hppro1.clickHandler = new Handler(this.cbHandler, [cb_hppro1]);
            cb_hppro2.clickHandler = new Handler(this.cbHandler, [cb_hppro2]);
            cb_hppro3.clickHandler = new Handler(this.cbHandler, [cb_hppro3]);
            cb_mppro1.clickHandler = new Handler(this.cbHandler, [cb_mppro1]);
            cbb_hppro1param1.selectHandler = new Handler(this.cbbHandler, [cbb_hppro1param1]);
            cbb_hppro1param1.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_hppro2param1.selectHandler = new Handler(this.cbbHandler, [cbb_hppro2param1]);
            cbb_hppro2param1.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_hppro3param1.selectHandler = new Handler(this.cbbHandler, [cbb_hppro3param1]);
            cbb_hppro3param1.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_mppro1param1.selectHandler = new Handler(this.cbbHandler, [cbb_mppro1param1]);
            cbb_mppro1param1.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cb_battleoption1.clickHandler = new Handler(this.cbHandler, [cb_battleoption1]);
            cb_battleoption2.clickHandler = new Handler(this.cbHandler, [cb_battleoption2]);
            cb_battleoption3.clickHandler = new Handler(this.cbHandler, [cb_battleoption3]);
            cb_battleoption4.clickHandler = new Handler(this.cbHandler, [cb_battleoption4]);
            cb_battleoption5.clickHandler = new Handler(this.cbHandler, [cb_battleoption5]);
            cb_battleoption6.clickHandler = new Handler(this.cbHandler, [cb_battleoption6]);
            cbb_guajiparam1.selectHandler = new Handler(this.cbbHandler, [cbb_guajiparam1]);
            cbb_guajiparam1.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_guajiparam2.selectHandler = new Handler(this.cbbHandler, [cbb_guajiparam2]);
            cbb_guajiparam2.list.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cb_guajiparam3.clickHandler = new Handler(this.cbHandler, [cb_guajiparam3]);
            cb_autobuypill.clickHandler = new Handler(this.cbHandler, [cb_autobuypill]);
            btn_gj.clickHandler = new Handler(this.guajiHandler);
            ti_hppro1param2.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            ti_hppro2param2.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            ti_mppro1param2.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            ti_mppro1param2.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            ti_hppro1param2.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            ti_hppro2param2.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            txt_hppro1num.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            txt_mppro1num.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            txt_hppro2num.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            txt_hppro3num.addEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            txt_hppro1num.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            txt_mppro1num.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            txt_hppro2num.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            txt_hppro3num.addEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            this.addEventListener(MouseEvent.MOUSE_DOWN, this.noFocus);
            return;
        }// end function

        protected function doSliderDown(event:MouseEvent) : void
        {
            this.isMouseDown = true;
            return;
        }// end function

        protected function fuck(event:MouseEvent) : void
        {
            cbb_guajiparam1.isOpen = false;
            cbb_guajiparam2.isOpen = false;
            cbb_hppro1param1.isOpen = false;
            cbb_hppro2param1.isOpen = false;
            cbb_hppro3param1.isOpen = false;
            cbb_mppro1param1.isOpen = false;
            cbb_pickuparmlv.isOpen = false;
            return;
        }// end function

        protected function noFocus(event:MouseEvent) : void
        {
            GlobalLayer.instance.root.focus = null;
            return;
        }// end function

        protected function doStop(event:MouseEvent) : void
        {
            event.stopPropagation();
            return;
        }// end function

        protected function doFocusOut(event:FocusEvent) : void
        {
            var _loc_2:* = event.currentTarget as TextInput;
            if (int(_loc_2.text) <= 0)
            {
                _loc_2.text = "1";
            }
            var _loc_3:* = _loc_2.name;
            var _loc_4:* = _loc_2.text;
            ModelProxy.change("zone", "updateOption", {key:_loc_3, data:_loc_4});
            return;
        }// end function

        private function guajiHandler() : void
        {
            if (btn_gj.label == "开始挂机")
            {
                ModelProxy.change("zone", "startGuaji", null);
                WarningManager.show(85);
            }
            else
            {
                ModelProxy.change("zone", "stopGuaji", null);
                WarningManager.show(86);
            }
            return;
        }// end function

        public function setGuaji(param1:Boolean) : void
        {
            if (param1)
            {
                btn_gj.label = "取消挂机";
            }
            else
            {
                btn_gj.label = "开始挂机";
            }
            return;
        }// end function

        protected function doSliderEnd(event:Event) : void
        {
            if (this.isMouseDown)
            {
                ModelProxy.change("zone", "updateOption", {key:event.currentTarget.name, data:int((event.currentTarget as Slider).value)});
                this.isMouseDown = false;
            }
            return;
        }// end function

        protected function doSliderChange(event:Event) : void
        {
            this["txt_" + event.target.name].text = (event.target as Slider).value + "%";
            return;
        }// end function

        private function default1Set() : void
        {
            var _loc_1:* = ModelProxy.getValue("data", "option");
            if (_loc_1)
            {
                _loc_1.pickupdrug = 0;
                _loc_1.pickuparm = 1;
                _loc_1.pickuptask = 1;
                _loc_1.pickupmaterial = 1;
                _loc_1.pickupother = 1;
                _loc_1.pickupgold = 1;
                _loc_1.pickupbgold = 0;
                _loc_1.pickupbylv = 0;
                _loc_1.pickuparmlv = 2;
                _loc_1.autopickup = 1;
                _loc_1.pickupfilter = 0;
                _loc_1.pickupxiyou = 1;
            }
            this.setPickUpShow();
            ModelProxy.change("zone", "defaultOption", 1);
            return;
        }// end function

        private function default0Set() : void
        {
            var _loc_1:* = ModelProxy.getValue("data", "option");
            if (_loc_1)
            {
                _loc_1.showname = 1;
                _loc_1.showwing = 1;
                _loc_1.showblood = 1;
                _loc_1.showtitle = 1;
                _loc_1.showmoveblood = 1;
                _loc_1.showdrop = 1;
                _loc_1.showheadarm = 1;
                _loc_1.hideskill = 0;
                _loc_1.nobusiness = 0;
                _loc_1.nomakefriend = 0;
                _loc_1.nounion = 0;
                _loc_1.noteam = 0;
                _loc_1.showgncount = 1;
                _loc_1.showfsname = 0;
            }
            this.setBaseShow();
            ModelProxy.change("zone", "defaultOption", 0);
            return;
        }// end function

        private function doClose() : void
        {
            this._instance.close();
            WarningManager.show(76);
            return;
        }// end function

        private function cbbHandler(param1:ComboBox, param2:int) : void
        {
            var _loc_3:* = param1.name;
            ModelProxy.change("zone", "updateOption", {key:_loc_3, data:param2});
            return;
        }// end function

        private function rgHandler(param1:RadioGroup, param2:int) : void
        {
            var _loc_3:* = param1.name;
            ModelProxy.change("zone", "updateOption", {key:_loc_3, data:param2});
            return;
        }// end function

        private function cbHandler(param1:CheckBox) : void
        {
            var _loc_2:* = param1.name;
            var _loc_3:* = int(param1.selected);
            ModelProxy.change("zone", "updateOption", {key:_loc_2, data:_loc_3});
            if (this.career == 1)
            {
                if (_loc_2 == "battleoption2")
                {
                    if (cb_battleoption1.selected)
                    {
                        cb_battleoption1.selected = false;
                        ModelProxy.change("zone", "updateOption", {key:"battleoption1", data:0});
                    }
                }
                else if (_loc_2 == "battleoption1")
                {
                    if (cb_battleoption2.selected)
                    {
                        cb_battleoption2.selected = false;
                        ModelProxy.change("zone", "updateOption", {key:"battleoption2", data:0});
                    }
                }
            }
            return;
        }// end function

        public function removeEvent() : void
        {
            btn_close.clickHandler = null;
            cb_showname.clickHandler = null;
            cb_showblood.clickHandler = null;
            cb_showtitle.clickHandler = null;
            cb_showmoveblood.clickHandler = null;
            cb_showdrop.clickHandler = null;
            cb_hideskill.clickHandler = null;
            cb_nobusiness.clickHandler = null;
            cb_nomakefriend.clickHandler = null;
            cb_nounion.clickHandler = null;
            cb_noteam.clickHandler = null;
            btn_default0.clickHandler = null;
            cb_pickupdrug.clickHandler = null;
            cb_pickuparm.clickHandler = null;
            cb_pickupmaterial.clickHandler = null;
            cb_pickupgold.clickHandler = null;
            cb_pickupbylv.clickHandler = null;
            cbb_pickuparmlv.selectHandler = null;
            cb_autopickup.clickHandler = null;
            cb_pickupfilter.clickHandler = null;
            btn_default1.clickHandler = null;
            cb_hppro1.clickHandler = null;
            cb_hppro2.clickHandler = null;
            cb_hppro3.clickHandler = null;
            cb_mppro1.clickHandler = null;
            cbb_hppro1param1.selectHandler = new Handler(this.cbbHandler, [cbb_hppro1param1]);
            cbb_hppro2param1.selectHandler = new Handler(this.cbbHandler, [cbb_hppro2param1]);
            cbb_hppro3param1.selectHandler = new Handler(this.cbbHandler, [cbb_hppro3param1]);
            cbb_mppro1param1.selectHandler = new Handler(this.cbbHandler, [cbb_mppro1param1]);
            cb_battleoption1.clickHandler = new Handler(this.cbHandler, [cb_battleoption1]);
            cb_battleoption2.clickHandler = new Handler(this.cbHandler, [cb_battleoption2]);
            cb_battleoption3.clickHandler = new Handler(this.cbHandler, [cb_battleoption3]);
            cb_battleoption4.clickHandler = new Handler(this.cbHandler, [cb_battleoption4]);
            cbb_guajiparam1.selectHandler = null;
            cbb_guajiparam2.selectHandler = null;
            cb_guajiparam3.clickHandler = null;
            cb_autobuypill.clickHandler = null;
            btn_gj.clickHandler = null;
            ti_hppro1param2.removeEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            ti_hppro2param2.removeEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            ti_mppro1param2.removeEventListener(FocusEvent.FOCUS_OUT, this.doFocusOut);
            ti_mppro1param2.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            ti_hppro1param2.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            ti_hppro2param2.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_guajiparam1.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_guajiparam2.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_hppro1param1.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_hppro2param1.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_hppro3param1.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_mppro1param1.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            cbb_pickuparmlv.removeEventListener(MouseEvent.MOUSE_DOWN, this.doStop);
            this.removeEventListener(MouseEvent.MOUSE_DOWN, this.fuck);
            return;
        }// end function

    }
}
